package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IUpdatePassword;

public class UpdatePasswordImpl implements IUpdatePassword {
    private UserDAO userDAO ;
    public UpdatePasswordImpl(Context context){userDAO = new UserDAO(context);}


    @Override
    public void updateLoginPassword(String phone, String newPassword) {
        userDAO.updatePasswordByPhone(phone, newPassword);
    }

    @Override
    public void updatePayPassword(String phone,  String newPayPassword) {
        userDAO.updatePayPasswordByPhone(phone,  newPayPassword);
    }


    @Override
    public User getUser(String phone) {
        return userDAO.getUser(phone);
    }
}
